package com.zcr.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zcr.mapper.ManagerMapper;
import com.zcr.pojo.Manager;
import com.zcr.service.ManagerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @version 1.0
 * @author： 张诚
 * @date： 2021-03-04 09:48
 */
@Service("ManagerService")
public class ManagerServiceImpl extends ServiceImpl<ManagerMapper, Manager> implements ManagerService {

    @Resource
    private ManagerMapper managerMapper;

    public Manager loginByManagerName(String loginname){
        QueryWrapper<Manager> wrapper= Wrappers.query();
        wrapper.eq("user",loginname);
        return managerMapper.selectOne(wrapper);
    }

}
